<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 30px;">
        <table class="layui-table" id="categorieslist">
            <thead>
            <tr>
                <th scope="col">ID</th>
                <th scope="col">类别</th>
                <th scope="col">添加者</th>
                <th scope="col"></th>
            </tr>
            </thead>
            <tbody>
            <c:forEach var="cate" items="${sessionScope.categories}" varStatus="s">
                <form action="">
                    <tr>
                        <th scope="row">${s.index+1}</th>
                        <th scope="col">${cate.category}</th>
                        <th scope="col">${cate.adder}</th>
                        <th scope="col">
                            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" href="/DelCate?id=${cate.id}">删除</a>
                    </tr>
                </form>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>